home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2007 September
/
PCWSEP07.iso
/
Software
/
Resources
/
Internet
/
BadBlue PE 2.7
/
bb98.exe
/
SOword.php
< prev
next >
Wrap
PHP Script
|
2002-09-02
|
1KB
|
36 lines
<?php if (!defined("SOWord")) { define("SOWord", 1);
include("SOhttp.php");
// Retrieve Word file in HTML format.
// Inputs:
// $sAddr: address of BadBlue server (e.g., "127.0.0.1:8080")
// $sPath: path of shared file in EXT.INI file (e.g., "path3")
// $sFile: name of Word document to convert to HTML (e.g., "memo.doc")
// $sPage: [by reference] return variable set to the document contents
// $sUser: (optional) user-name to get access to file
// $sPassword: (optional) password to get access to file
// Outputs:
// $errmsg: empty if no error occurred, otherwise error message
//
function SOWord($sAddr, $sPath, $sFile, &$sPage,
$sUser = "", $sPassword = "") {
$errmsg = "";
do {
// Construct URL and grab page...
//
$sURL = "http://".$sAddr."/ext.dll?MfcISAPICommand=LoadPage&".
"page=doc.htx&a0=/get/".$sPath."/".rawurlencode($sFile).
"&a1=_&a2=2048&a3=8&a4=1";
$errmsg = SOHTTPGet($sURL, &$sPage, $sUser, $sPassword);
if (strlen($errmsg)) {
break;
}
} while (0);
return ($errmsg);
}
} ?>